import React, { Suspense } from 'react'
import Protect from './protect'

import { Switch, Route } from 'react-router-dom'
import Loading from '../components/Loading'


let AboutA = React.lazy(() => import(/*webpackChunkName:"abouta" */'../components/Home/about/a/a'))
let AboutB = React.lazy(() => import(/*webpackChunkName:"aboutb" */'../components/Home/about/b/b'))

const AboutRoutes: React.FC = function () {
  return <>
    <Suspense fallback={<Loading />}>
      <Switch>
        <Protect path='/about/a' component={AboutA} level={9}></Protect>
        <Route path='/about/b' component={AboutB}></Route>
      </Switch>
    </Suspense>
  </>
}

export default AboutRoutes